# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-utidylib
_pkgname=uTidylib
pkgver=0.6
pkgrel=1
groups=('blackarch' 'blackarch-misc')
pkgdesc='Python bindings for Tidy HTML parser/cleaner.'
arch=('any')
url='http://utidylib.berlios.de'
license=('MIT')
depends=('tidyhtml')
makedepends=('python2' 'python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/uTidylib-$pkgver.tar.gz")
sha512sums=('a85506ef8824f66ee326ad651020dc3b4e00190e20dcd3814984fa27ff319f492fe5bac781b7c43c8694cbfc63409e3abda18981969c9be2c3cd023fe7a4f2f8')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/python-utidylib/LICENSE"
}

